<body class="inside-header inside-aside is-dialog">
<div id="main" role="main">
    <div class="tab-content tab-addtabs">
        <div id="content">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                    <div class="content">
                        <style>
                            .panel-fieldlist .fieldlist dd ins {
                                width: 20%;
                            }

                            .panel-fieldlist .fieldlist dd input, .panel-fieldlist .fieldlist dd select {
                                width: 100%;
                            }

                            .list-group-item {
                                display: flex;
                                align-items: center;
                                justify-content: space-between;
                            }

                            .groups {
                                display: flex;
                                align-items: center;
                            }

                            .title {
                                font-weight: bold;
                                font-size: 16px;
                            }

                            .list-group .list-group-item .label {
                                padding: 5px 10px;
                            }

                            .table-goods > thead > tr > th, .table-goods > tbody > tr > th, .table-goods > thead > tr > td, .table-goods > tbody > tr > td {
                                vertical-align: middle;
                            }

                            .order-status {
                                display: flex;
                                justify-content: space-between;
                                align-items: center;
                            }

                            .print-flex {
                                display: flex;
                                justify-content: space-between;
                                align-items: center;
                            }

                            @media print {
                                .electronics, .btn-print-page, .memo-operate {
                                    display: none;
                                }
                            }
                        </style>
                        <div id="app">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    用户信息
                                    <a href="javascript:;" onclick="window.print();"
                                       class="btn btn-info btn-xs pull-right btn-print-page">
                                        <i class="fa fa-print"></i>
                                        打印
                                    </a>
                                </div>
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <ul class="list-group">
                                                <li class="list-group-item">当前用户：{$row.nickname}【{$row.group.name}】</li>
                                                <li class="list-group-item">
                                                    直推用户：
                                                    {notempty name="$user_relation.puser"}
                                                    {$user_relation.puser.nickname}【{$user_relation.puser.group.name}】
                                                    {/notempty}
                                                </li>
                                                <li class="list-group-item">
                                                    绑定用户：
                                                    {notempty name="$user_relation.user1"}
                                                    {$user_relation.user1.nickname}【{$user_relation.user1.group.name}】
                                                    {/notempty}
                                                </li>
                                                <li class="list-group-item">
                                                    绑定门店：
                                                    {notempty name="$user_relation.user2"}
                                                    {$user_relation.user2.nickname}【{$user_relation.user2.group.name}】
                                                    {/notempty}
                                                </li>
                                                <li class="list-group-item">
                                                    绑定分公司：
                                                    {notempty name="$user_relation.user3"}
                                                    {$user_relation.user3.nickname}【{$user_relation.user3.group.name}】
                                                    {/notempty}
                                                </li>
                                                <li class="list-group-item">
                                                    绑定合伙人：
                                                    {notempty name="$user_relation.user4"}
                                                    {$user_relation.user4.nickname}【{$user_relation.user4.group.name}】
                                                    {/notempty}
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="col-xs-6">
                                            <ul class="list-group">
                                                <li class="list-group-item">累计佣金/积分：{$total_brokerage}</li>
                                                <li class="list-group-item">推广人数：{$total_popularize_num}</li>
                                                <li class="list-group-item">推广单数：{$total_order_num}</li>
                                            </ul>
                                        </div>
                                        <div class="col-xs-6">
                                            <ul class="list-group">
                                                <li class="list-group-item">推广用户：{$user_1_count}</li>
                                                <li class="list-group-item">推广门店：{$user_2_count}</li>
                                                <li class="list-group-item">推广分公司：{$user_3_count}</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- 推广用户 -->
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <span>推广用户 ( {$user_1_count} )</span>
                                </div>
                                <div class="panel-body">
                                    <table class="table table-bordered table-goods">
                                        <thead>
                                        <tr>
                                            <th>用户昵称</th>
                                            <th>加入时间</th>
                                            <th>推广人数</th>
                                            <th>累计积分</th>
                                            <th>推广单数</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {notempty name="$user_1_list"}
                                        {foreach $user_1_list as $key => $row}
                                        <tr>
                                            <td>{$row.nickname}</td>
                                            <td>{$row.jointime}</td>
                                            <td>{$row.total_user}</td>
                                            <td>{$row.total_brokerage}</td>
                                            <td>{$row.total_order_num}</td>
                                        </tr>
                                        {/foreach}
                                        {/notempty}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <!-- 推广门店 -->
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <span>推广门店 ( {$user_2_count} )</span>
                                </div>
                                <div class="panel-body">
                                    <table class="table table-bordered table-goods">
                                        <thead>
                                        <tr>
                                            <th>用户昵称</th>
                                            <th>加入时间</th>
                                            <th>推广人数</th>
                                            <th>累计佣金</th>
                                            <th>推广单数</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {notempty name="$user_2_list"}
                                        {foreach $user_2_list as $key => $row}
                                        <tr>
                                            <td>{$row.nickname}</td>
                                            <td>{$row.jointime}</td>
                                            <td>{$row.total_user}</td>
                                            <td>{$row.total_brokerage}</td>
                                            <td>{$row.total_order_num}</td>
                                        </tr>
                                        {/foreach}
                                        {/notempty}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <!-- 推广分公司 -->
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <span>推广分公司 ( {$user_3_count} )</span>
                                </div>
                                <div class="panel-body">
                                    <table class="table table-bordered table-goods">
                                        <thead>
                                        <tr>
                                            <th>用户昵称</th>
                                            <th>加入时间</th>
                                            <th>推广人数</th>
                                            <th>累计佣金</th>
                                            <th>推广单数</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {notempty name="$user_3_list"}
                                        {foreach $user_3_list as $key => $row}
                                        <tr>
                                            <td>{$row.nickname}</td>
                                            <td>{$row.jointime}</td>
                                            <td>{$row.total_user}</td>
                                            <td>{$row.total_brokerage}</td>
                                            <td>{$row.total_order_num}</td>
                                        </tr>
                                        {/foreach}
                                        {/notempty}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>